<?php

interface A{
    public function foo(int $id): int ;

}

interface B extends A {
    public function bar(string $name): string ;
}

trait Ainstance {
    public function foo(int $id): int {
        return $id;
    }
}

trait Binstance {
    public function bar(string $name): string {
        return $name;
    }
}
class Demo implements B {

    use Ainstance;
    use Binstance;
}


$obj = new Demo();

echo $obj->foo(2);
echo $obj->bar('hj');